package com.huatai.bpmn.controller;

import java.util.List;

import com.huatai.bpmn.entity.UserGroupEntity;
import com.huatai.bpmn.service.UserGroupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huatai.common.api.R;



/**
 *
用户分组，用于审批
 *
 * @author yxy
 * @email yuanxy999@126.com
 * @date 2024-08-22 10:57:56
 */
@RestController
@RequestMapping("sysusergroup")
@Api(tags = " 用户分组，用于审批",value = "用户分组，用于审批")
public class UserGroupController {
    @Autowired
    private UserGroupService sysUserGroupService;


	@GetMapping("/list")
	@ApiOperation("用户分组列表")
   public R<List<UserGroupEntity>> list(){
	   return R.data(sysUserGroupService.listByUser());
   }

   @PostMapping("/addOrUpdate")
   @ApiOperation("用户分组新增修改")
   public R addOrUpdate(@RequestBody UserGroupEntity sysUserGroupEntity){
	   return R.data(sysUserGroupService.addOrUpdate(sysUserGroupEntity));
   }
}
